package com.lvy.hczn.front.system.domain.business;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lvy.hczn.front.common.core.domain.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 销售单详情
 *
 * @author yw
 * @date 2021-12-15 16:17:45
 */
@Data
@TableName("sale_order_detail")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "销售单详情")
public class SaleOrderDetail extends BaseModel<SaleOrderDetail> {

    /**
     * 销售单编号
     */
    @ApiModelProperty(value = "销售单编号")
    private String saleOrderCode;

    /**
     * 商品编号
     */
    @ApiModelProperty(value = "商品编号")
    private String goodsCode;

    @ApiModelProperty(value = "来源")
    private String sourceId;

    /**
     * 商品单价
     */
    @ApiModelProperty(value = "商品单价")
    private BigDecimal price;

    @ApiModelProperty(value = "分拣后实际价格")
    private BigDecimal actPrice;

    /**
     * 购买数量
     */
    @ApiModelProperty(value = "购买数量")
    private Integer quantity;

    /**
     * 单位
     */
    @ApiModelProperty(value = "数量单位")
    private String unit;

    /**
     * 重量
     */
    @ApiModelProperty(value = "重量")
    private BigDecimal weight;

    @ApiModelProperty(value = "实际分拣重量")
    private BigDecimal actWeight;

    @ApiModelProperty(value = "溯源码（可用于分拣订单箱扫描商品入库，需要每个打包的物品都扫描）或者不用溯源码，直接扫临时存储的货架二维码，存储当前货架的摆放物品（此方式需要分拣员不能放错物品）")
    private String traceCode;

    @ApiModelProperty(value = "供应商编码")
    private String supplierCode;

    @ApiModelProperty(value = "供应商名称")
    private String supplierName;

    @ApiModelProperty(value = "批次编号，当批次存在时，只分拣同批次原料")
    private String batchCode;

    /**
     * 状态   0待分拣,1正在分拣(已分配任务给分拣员，处于分拣员分拣中或等待分拣员分拣),2已分拣 3已退货 4分拣缺货 5异常分拣,暂时用数字，类型设置为字符串，后期数字可能会调整
     */
    @ApiModelProperty(value = "0：待分拣,1：正在分拣(已分配任务给分拣员，处于分拣员分拣中或等待分拣员分拣),2：已分拣 3：已退货 4：分拣缺货 5：异常分拣 6：已完成（如退货入库完成）")
    private String status;

    @ApiModelProperty(value = "体积")
    private BigDecimal volume;

    /**
     * 是否为领取货物   0：否  1：是
     */
    @ApiModelProperty(value = "是否为领取货物   0：否  1：是 ")
    private Integer takeDeliveryOf;

    @ApiModelProperty(value = "sku")
    private String skuCode;

    @ApiModelProperty(value = "商品规格")
    private String specCode;

    @ApiModelProperty(value = "商品编号")
    private String spuId;

    /**
     * 数据类型：1：入库单；2：出库单；3：销售出库
     */
    @ApiModelProperty(value = "单据类型:\"CSRK\": \"铺货入库\", \"CGRK\": \"预售补货\"，“XSBH”：\"销售补货\", \"DBRK\": \"调拨入库\",\"DBCK\": \"调拨出库\", \"HSCK\": \"报损出库\", \"QXRK\": \"取消入库\", \"TDRK\": \"退单入库\", \"FHCK\": \"销售发货出库\"")
    private String dataType;

    @ApiModelProperty(value =  "生产日期")
    private LocalDateTime produceDate;

    @ApiModelProperty(value = "生产加工方式")
    private String materialProcessId;

    @ApiModelProperty(value = "商品编码")
    @TableField(exist = false)
    private String spuCode;

    @ApiModelProperty(value = "商品名称")
    @TableField(exist = false)
    private String spuName;

    @ApiModelProperty("实际存储温区编码")
    @TableField(exist = false)
    private String temperatureCode;

    @ApiModelProperty("实际存储温区名称")
    @TableField(exist = false)
    private String temperatureCodeName;

    @ApiModelProperty(value = "是否大件0:否,1:是")
    @TableField(exist = false)
    private Integer bigProduct;

    @ApiModelProperty(value = "预售类型（0:非预售，1：预售,）")
    @TableField(exist = false)
    private Integer outStock;

}
